package io.github.wanggit.antrpc.demos.circuit_breaker.circuit_breaker_provider.service;

import io.github.wanggit.antrpc.commons.annotations.RpcMethod;
import io.github.wanggit.antrpc.commons.annotations.RpcService;
import io.github.wanggit.antrpc.demos.circuit_breaker.GlobalBreakerService;

@RpcService
public class GlobalBreakerServiceImpl extends SwitchServiceImpl implements GlobalBreakerService {

    @RpcMethod
    @Override
    public String doLowerCase(String s) {
        if (success){
            return s.toLowerCase();
        }else {
            throw new RuntimeException("Service ERROR.");
        }
    }
}
